﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Player.ZhiBo
{
    public partial class ZBtype1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["typeid"] != null)
                {
                    int id = Convert.ToInt32(Request.QueryString["typeid"]);
                    switch (id)
                    {
                        case 1:
                            this.DataList1.DataSource = BLL.GameManage.SeleJingXuanGame();
                            this.DataList1.DataBind();
                            break;
                        case 2:
                            this.DataList1.DataSource = BLL.GameManage.SeleMianFeiGame();
                            this.DataList1.DataBind();
                            break;
                        case 3:
                            this.DataList1.DataSource = BLL.GameManage.SeleFuFeiGame();
                            this.DataList1.DataBind();
                            break;
                    }
                    return;
                }

                if (Request.QueryString["id"] != null)
                {
                    int id = Convert.ToInt32(Request.QueryString["id"]);
                    this.DataList1.DataSource = BLL.GameManage.SeleTypeIdGame(id);
                    this.DataList1.DataBind();
                    return;
                }
                this.DataList1.DataSource = BLL.GameManage.SeleAllGame();
                this.DataList1.DataBind();
            }
        }
    }
}